package com.lace.ctrl.admin.web.company.controller;

import com.lace.security.jwt.auth.UserContext;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by WangZX on 2018/7/12 0012.
 */
@RestController
@RequestMapping("/v1/admin")
public class AdminController {

    @RequestMapping
    public Object index(Authentication authentication){
        String a = null;
        System.out.println(a.charAt(0));

        return "admin page!"+((UserContext)authentication.getPrincipal()).getUserName();
    }
}
